<%@ page language="java" import="java.util.*,com.icss.ah.base.util.ResourceLoader" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String proDesc = ResourceLoader.getInstance("icss").getString("proDesc");
%>

<!DOCTYPE HTML>
<html>
  <head>
  	<meta http-equiv="X-UA-Compatible" content="IE=8">
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	<meta content="B2B电商平台" name="description"/>
	<meta content="B2B电商平台" name="keyword"/>
	
	<title>B2B电商平台.店铺商品类型维护</title>
	<link rel="icon" href="include/images/icss.ico" type="image/x-icon" />
	<link rel="shortcut icon" href="include/images/icss.ico" type="image/x-icon" />
	<link rel="stylesheet" href="<%=path%>/include/JQuery zTree v3.4/css/demo.css">
	<link rel="stylesheet" href="<%=path%>/include/JQuery zTree v3.4/css/zTreeStyle/zTreeStyle.css">
	<link rel="stylesheet" type="text/css" href="<%=path %>/include/css/global.css" />
	<link rel="stylesheet" type="text/css" href="<%=path %>/include/css/style.css" />
	
	<script type="text/javascript" src="<%=path %>/include/js/jquery-1.8.0.min.js"></script>
<script type="text/javascript" src="<%=path %>/include/js/icss.shop.manage.js"></script>
	<script type="text/javascript" src="<%=path %>/include/js/cookies.js"></script>
    <script type="text/javascript" src="<%=path%>/include/JQuery zTree v3.4/js/jquery.ztree.core-3.4.js"></script>
	<script type="text/javascript" src="<%=path%>/include/JQuery zTree v3.4/js/jquery.ztree.excheck-3.4.js"></script>
	<script type="text/javascript" src="<%=path %>/include/js/icss.busin.js"></script>
	<script type="text/javascript" src="<%=path %>/include/js/icss.common.js"></script>
	
	<style type="text/css">
		body{font-size: 14px;padding: 0px;}
		.title_div{
			height: 81px;
			padding-top: 20px;
			text-align: center;
			//border-bottom: 3px solid #e0e0e0;
			background: #fff;
		}
		.titleCss{
			height: 65px;
			width: 790px;
			margin: 0 auto;
			background: url('<%=path %>/images/postTrade/post_trade_one.png') no-repeat 0 0;
		}
		.title_2{
			background-position: 0 -200px;
		}
		.mainDiv{
			margin: 10px auto;
		}
		.nextDiv button{
		    font: 20px "Microsoft YaHei", "SimHei ";
	    	line-height: 63px;
    		width: 203px;
			background: url('<%=path %>/images/postTrade/pic-global.png') no-repeat -148px -558px;
			color: #fff;
		}
	    .subDiv{
	    	height: 103px;
	    	text-align: center;
	    	padding-top: 60px;
	    	background: #fff;
	    }
	    .nextDiv{
	    	width: 279px;
	    	height: 100%;
	    	margin: 0px auto;
	    }
	    .main_div1{
	    	background:#fff; 
	    	height:48px;
	    	margin: 10px 0px;
	    	border-top: 4px solid #F75D5F;
	    	line-height: 48px;
	    	padding: 0px 10px;
	    }
	    .btCss{
	    	height: 22px;
    		width: 60px;
    		background: url('<%=path %>/images/postTrade/abtnBg.png');
    		float: left;
    		margin: 13px 0 0 20px;
    		font-size: 12px;    
    		line-height: 22px;
    		padding-left: 20px;
    		margin-left: 20px;
	    }
	    a {
		    color: #039;
		    text-decoration: none
	    }
	    ul,li{
	    	list-style: none;
	    }
	    .main_div1 li{
	    	float: left;
	    	font-size: 12px;
	    }
	    .saveDraftCss{
	    	float: right;
	    	border: 1px solid #cfcfcf;
	    	color:#333;
	    	line-height:28px;
	    	margin:10px 0px;
	    	padding: 0px 20px;
	    }
	    .saveDraftCss:hover {
	    	background: #ff8048;
	    	color:#fff;
	    	border: 1px solid #f67943;
	    }
	    .getDraftCss:hover {
	    	color:red;
	    }
	    .divCss_title{
	    	background: #fff;
		    height: 40px;
		    font: 18px/40px "Microsoft YaHei", "SimHei ";
		    text-indent: 10px;
		    border-bottom: 1px solid #d1d1d1;
		    color: #000;
		   
	    }
	    .tipH4{
	    	width:80px;
	    	float:left;
	    	font-weight: bold;
	    	line-height: 18px;
	    }
	    .cdyParaCss ul{
	    	width: 280px;border: 1px solid #c7c7c7;height: 22px;
	    }
	    .cdyParaCss ul li{
	    	display:none;
	    }
	    .cdyParaCss .tdL{
	    	text-align: right;width: 152px;
	    }
	    .cdyParaCss .tdR{
	    	text-align: left;padding-left: 10px;vertical-align: middle;
	    }
	    .cdyParaCss .tdR div{
	    	width:280px;border: 1px solid #c7c7c7;height: 22px;
	    }
	    .cdyParaCss .tdR input{
	    	border: 0px;padding: 0px 3px;margin-top: -15px;width: 250px;
	    }
	    .cdyParaCss .tdR s,td div s,.addPrice_css{
    	    float: right;
		    width: 21px;
		    height: 22px;
		    background: url('<%=path %>/images/postTrade/pic-global.png') no-repeat -275px -275px;
	    }
	    .cdyParaCss .tdR select{
	    	appearance:none;-moz-appearance:none;-webkit-appearance:none;
	    	width: 282px;margin: 20px 0 0 -257px;position: absolute;overflow: auto;max-height: 200px;
	    }
	    .cdyParaCss .tdR select option{
	    	heigth:20px;padding:5px 3px 0px;
	    }
	    .cdyParaCss .tdR select option:hover{
	    	background: #ebebeb;
	    }
	    .borderCss{
	    	border-top: 1px dashed #ccc;margin: 20px 80px;padding-bottom: 5px;
	    }
	    .div_title_css{
	    	border: 0px;margin: 15px 0px 10px 80px;;white-space: nowrap;
	    }
	    .div_title_css table tr td{
	    	width: 16%;
	    }
	    .div_title_css table tr td input{
	    	width: 90%;height: 22px;
	    }
	    .div_title_css p{
	    	color: #999;padding: 10px 0px 10px 83px;white-space: normal;
	    }
	    .radioCss{
	    	margin: 0px;
	    }
	    .line_color_css td{
	    	border-top: 1px solid #c7c7c7;
	    }
	    .td1{
	    	width: 130px;text-align: right;padding-right: 10px;
	    }
	    .addPrice_css{
	    	height: 11px;
		    background-position: -478px -298px;
		    margin-top: 11px;
		    margin-left: 5px;
		    float: left;
	    }
	    .img_css{
	    	padding-right: 10%;float: left;width: 14%;margin-top: 20px;
	    }
	    .add_img_div{
	     	height: 102px;
    		width: 102px;
	    	background: url('<%=path %>/images/postTrade/addIco.png') no-repeat 0px -50px;
	    }
	    td {
	    	vertical-align: middle;
	    }
	</style>
	
	<script type="text/javascript">
	   
	   $(document).ready(function(){
			$(document).mousedown(function (e) {  
             	var className = $(e.target).attr("class");
             	if(className!='selectI'&&className!='selectS'&&className!='selectO'&&className!='selType'){
             		$(".checkSelect").hide();
             		_clickInput('1');
             	}
         	}); 
			
		  });

		function _goBackPage(){//返回上一页
			window.location.href = "<%=path %>/productPublish/toProductPublishOnePage.do";
		}
		function _getDraftListPage(){//草稿列表页
			window.location.href = "<%=path %>/productPublish/toProductPublishOnePage.do";
		}
		function _saveDraftInfo(){//草稿列表页
			window.location.href = "<%=path %>/productPublish/toProductPublishOnePage.do";
		}
		function _selVal(para){//商品参数项搜索
			$("#sel0").css("display","");
			$("#sel0").size(6);
			$(".att0").css("border","1px solid #86b4f8");
			$(".att0 s").css("background-position", "-275px -308px");
		}
		var paraNum = 0;
		function _baseParam(code){
			$.ajax({
				type:"post",
				url:'<%=path%>/productPublish/queryBaseParam.do',
				dataType:"json",
				data:{itemCode:code},
				success:function(data){
					if(data){
						var arr = data.baseParaList;
						var colNames = "0";
						var paraNames = "0";
						var paramShows = "0";
						paraNum = arr.length;
						for(var i=0;i<arr.length;i++){
							var d = arr[i];
							colNames += ",att"+i;
							paraNames += ","+d.PARAM_NAME;
							paramShows += ","+d.PARAM_SHOW;
							var html = "<tr>";
							html += "	<td class='tdL'>"+d.PARAM_NAME+"：</td>";
							html += "	<td class='tdR'>";
							html += "		<div class='att"+i+"'>";
							if(d.PARAM_TYPE==2){ 
								html += "<input id='att"+i+"' onclick=\"_clickInput('att"+i+"')\" class='selectI' onchange='_changeVal(this.id)' name='att"+i+"' placeholder='可直接输入内容'/>";
								html += "<s onclick=\"_clickInput('att"+i+"')\" class='selectS'> </s><br/>";
							}else{
								html += "<input id='att"+i+"' name='att"+i+"' placeholder=''/>";
							}
							html += "		</div>";
							html += "<input type=\"hidden\" id=\"viewCode"+i+"\" name=\"viewCode"+i+"\" value=\""+d.PARAM_ENTRANCE+"\">";
							html += "<input type=\"hidden\" id=\"pUuid"+i+"\" name=\"pUuid"+i+"\" value=\""+d.pUuid+"\">";
							html += "	</td>";
							html += "</tr>";
							$("#cdyPara").append(html);
						}
						$("#colNames").val(colNames);
						$("#paraNames").val(paraNames);
						$("#paramShows").val(paramShows);
						for(var i=0;i<arr.length;i++){
							var d = arr[i];
							if(d.PARAM_TYPE==2) _pullList(i,d.PARAM_ENTRANCE);
						}
						_reHeight("rightFrame","contentDiv");
					}
				}
			});
		}

		function _pullList(num,viewCode){//select下拉列表
			var codeName = $("#codeName").val();
			$.ajax({
				type:"post",
				url:'<%=path%>/productPublish/queryDirectoryInfo.do',
				dataType:"json",
				//async:true,
				data:{viewCode:viewCode,codeName:codeName,flag:"1"},
				success:function(data){
					if(data){
						//$("#sel"+num).remove();
						var arr = data.directoryList;
						var html = "";
						if(arr.length==1)
							html += "<select id='sel"+num+"' size='"+arr.length+"' class='att"+(num+1)+" checkSelect' style='display:none;overflow: hidden;margin-top: 22px;'>";
						else
							html += "<select id='sel"+num+"' size='"+arr.length+"' class='att"+num+" checkSelect' style='display:none;margin-top: 22px;'>";
						for(var i=0;i<arr.length;i++){
							var d = arr[i];
							html += "<option onclick=\"_clickOption('att"+num+"','"+d.CODE_NAME+"')\" class='selectO' value='"+d.CODE_NAME+"'>"+d.CODE_NAME+"</option>";
						}
						html += "</select>";
						$("#att"+num).after(html);
					}
				}
			});
		}

		var para = "0";
		function _addPara(){
			var colNames = $("#colNames").val()+",att"+paraNum;
			para += ","+paraNum;
			var html = "<tr id='pn"+paraNum+"'>";
			html += "	<td class='tdL'><input id='para"+paraNum+"' name='para"+paraNum+"' style='text-align: right;height: 18px;width: 120px;' placeholder=''/>：</td>";
			html += "	<td class='tdR'>";
			html += "		<div class='att"+paraNum+"' style='float: left;margin-top: 5px;'>";
			html += "			<input id='att"+paraNum+"' name='att"+paraNum+"' placeholder=''/>";
			html += "		</div>";
			html += "		<input type=\"hidden\" id=\"pUuid"+paraNum+"\" name=\"pUuid"+paraNum+"\" value=\"-1\">";
			html += "		<span onclick=\"_delParaTr('"+paraNum+"')\" style='padding-left:5px;color:#039;margin-left:10px;'>删除</span>";
			html += "	</td>";
			html += "</tr>";
			paraNum++;
			$("#cdyPara").append(html);
			$("#colNames").val(colNames);
		}

		function _delParaTr(id){
			$("#pn"+id).remove();
			var colNames = $("#colNames").val();
			colNames = colNames.replace(",att"+id,'');
			$("#colNames").val(colNames);
		}

		function _addParaName(){
			var paraNames = $("#paraNames").val();
			var arr = para.split(",");
			for(var i=1;i<arr.length;i++){
				var val = $("#para"+arr[i]).val();
				if(typeof(val)=="undefined" || val==""){
					 _delParaTr(arr[i]);
				}else{
					 paraNames += ","+val;
				}
			}
			$("#paraNames").val(paraNames);
		}

		function _changeVal(id){
			$("#codeName").val($("#"+id).val());
			id = id.replace("att","");
			var viewCode = $("#viewCode"+id).val();
			//_pullList(id,viewCode);
			//_clickInput("att"+id);
		}
		
		function _clickInput(id){
			$("select[class!=selType]").css("display","none");
			$("select").parent("div").css("border","1px solid #c7c7c7");
			$("select").next("s").css("background-position", "-275px -275px");
			$(".selectS").css("background-position", "-275px -275px");
			$("."+id).css("display","");
			$("."+id).css("border","1px solid #86b4f8");
			$("."+id+" s").css("background-position", "-275px -308px");
		}

		function _clickOption(id,val){
			$("#"+id).val(val);
			$("."+id).css("border","1px solid #c7c7c7");
			$("."+id+" s").css("background-position", "-275px -275px");
			id = id.replace("att","");
			$("#sel"+id).css("display","none");
			if(id=="measuring"){
				 $(".unitVal").empty();
				 $(".unitVal").text(val);
			}
		}
		
		function _save(){
    		_addParaName();
    		var brandCode = $("#selbrand").val();
    		var proName = $("#proName").val();
    		if(proName == null || proName == ''){
    			alert("请输入商品名称");
    			return;
    		}
    		/*
    		var barCode = $("#barCode").val();
    		if(barCode == null || barCode == ''){
    			alert("请输入商品条码");
    			return;
    		}
       		var brand = $("#brand").val();
    		if(brand == null || brand == ''){
    			alert("请选择品牌名称");
    			return;
    		}*/
    		var dataStr = {};
 		    var dataArr = $("input").serializeArray();
 		    for (var i = 0; i < dataArr.length; i++) {
 		        dataStr[dataArr[i].name] = dataArr[i].value;
 		    }
 		    var colNames = $("#colNames").val();
 		    dataStr["brandCode"]=brandCode;
 		    dataStr["colNames"]=colNames;
 		    var paraNames = $("#paraNames").val();
 		    dataStr["paraNames"]=paraNames;
 		    var paramShows = $("#paramShows").val();
 		    dataStr["paramShows"]=paramShows;
			var arrCol = colNames.split(",");
			var arrPara = paraNames.split(",");
			for(var i=1;i<arrCol.length;i++){
				var val1 = $("#"+arrCol[i]).val();
				if(null==val1 || val1==""){
					alert(arrPara[i]+"不能为空");
	        		return;
				}
			}
			if(_checkKeyWord()){
        		alert("请维护商品关键字");
    			return;
    		}
    		$.ajax({
 	 		    type:"post",
 	 		    url:"<%=path%>/productPublish/saveTwo.do",
 	 		    data:dataStr,
 	 		  	dataType:"json",
 	 		    success:function(data){
 	 		    	console.info(data);
 	 	 		    var flag = data.saveFlag;
 	 	 		    var productId = data.productId;
 	 	 		    if(flag=="1"){
 	 	 	 		    var itemName = $("#itemName").val();
 	 	 	 		    var proName = $("#proName").val();
 	 	 	 		    window.location.href="<%=path %>/productPublish/toProductPublishThrPage.do?productId="+productId+"&itemName="+escape(escape(itemName))+"&proName="+escape(escape(proName));
 	 	 	 		}else{
 	 	 	 			alert("输入数据不规范，请检查后再保存");
 	 	 	 		}
 	 	 		}
 	 		});
    	}

	    function _onchangeBrandName(val){
	        $.ajax({
	            type:"post",
	            url:"<%=path %>/productPublish/getBrandInfo.do",
	            dataType:"json",
	            data:{brandName:val},
	            success:function(data){
	                if(data){
		                console.log(data);
		                var html = "";
	                    for(var i=0;i<data.length;i++){
	                        html += "<option value="+data[i].BRAND_CODE+" class='selectO' onclick=\"_clickOption('brand','"+data[i].BRAND_NAME+"'),_hideBrandTip(this.value)\">&nbsp;"+data[i].BRAND_NAME+"</option>";
	                    }
	                    $("#selbrand").empty();
	                    $("#selbrand").append(html);
	                }
	            }
	        });
	    }

	    function _checkBrand(val){
		    if(val == null || val == '') return;
		    $.ajax({
	            type:"post",
	            url:"<%=path %>/productPublish/getBrandInfo.do",
	            dataType:"json",
	            data:{brandName:val},
	            success:function(data){
	                if(data){
		                console.log(data);
		                var html = "";
	                    for(var i=0;i<data.length;i++){
		                    if(val == data[i].BRAND_NAME){
		                    	$("#brandTip").css("display","none");
		                    	$("#selbrand").val(data[i].BRAND_CODE);
		                    }else{
			                    alert("品牌不存在，请输入正确的品牌名称");
			                    $("#brandTip").css("display","");
			                    $("#selbrand").val("");
		                    }
	                    }
	                }
	            }
	        });
	    }

	    function _hideBrandTip(val){
	    	$("#brandTip").css("display","none");
        	$("#selbrand").val(val);
	    }

	    function _clickUnit(){
			 var productId = $("#barCode").val();
			 var productName = $("#proName").val();
			 var unit = $("#unitName").val();
			 var url="<%=path %>/productPublish/toUnitInfoPage.do?productId="+productId+"&productName="+escape(escape(productName))+"&unit="+escape(escape(unit));
			 parent.layer.open({
				 title: '挑选商品信息',
				 type: 2, 
				 area: ['850px', '385px'],
				 content: [url,'no'], //这里content是一个URL，如果你不想让iframe出现滚动条，你还可以content: [url, 'no']
				 end: function () {
	            	// location.reload();
					 _reHeight("rightFrame","contentDiv");
	             }			
			 });
		 }

		 $(function(){_measuringInfo("${itemCode}");});
		 function _measuringInfo(itemCode){//计量单位 flag: 2
			 
				$.ajax({
					type:"post",
					url:'<%=path%>/productPublish/queryUnitInfo.do',
					dataType:"json",
					  data:{itemCode:itemCode},
					success:function(data){
						if(data){
							var arr = data.directoryList;
							var html = "";
							var size = arr.length;
							var overFlow = "hidden";
							if(arr.length>10){
								size = 10;
								overFlow = "auto";
							}
							html += "<br><select id='selmeasuring' size='"+size+"' class='measuring' style='display:none;overflow:"+overFlow+";margin:-13px 0px 0px -1px;position: absolute;width:283px;'>";
							for(var i=0;i<arr.length;i++){
								var d = arr[i];
								html += "<option onclick=\"_clickOptionNew('measuring','"+d.UNIT_CODE+"','"+d.UNIT_NAME+"')\" class='selectO' value='"+d.UNIT_CODE+"'>"+d.UNIT_NAME+"</option>";
							}
							html += "</select>";
							$(".measuring").append(html);
							_reHeight("rightFrame","contentDiv");
						}
					}
				});
			}

		 function _clickOptionNew(id,val,valName){
				$("#"+id).val(valName);
				console.log($("#"+id));
				$("#"+id+"New").val(val+"#@"+valName);
				$("."+id).css("border","1px solid #c7c7c7");
				$("."+id+" s").css("background-position", "-275px -275px");
				id = id.replace("att","");
				$("#sel"+id).css("display","none");
				if(id=="measuring"){
					 $(".unitVal").empty();
					 $(".unitVal").text(valName);
				}
			}
  	</script>
	
	<script type="text/javascript">

	var zTree = null;
	
	$(function(){
		zTree = $.fn.zTree.init($("#treeDemo"), treeSetting);
	});
	/* 
	 * 下拉树的设置 
	 */  
	var treeSetting = {  
	    view: {  
	        dblClickExpand: false  
	    },  
		data: {  
			simpleData: {  
			    enable: true,
			    rootPId: 0
			}  
		},
		check: {  
			enable: true,
			autoCheckTrigger:true
		}, 
		async:{
			enable: true,//设置ztree是否开启异步加载模式
			showLine: true ,//设置是否显示连接线
			type: "post",//post方式请求数据
			url: getUrl,//数据请求url
			autoParam:["id","name"],//异步加载时需要自动提交父节点属性的参数
			otherParam:{"otherParam":"zTreeAsyncTest"},
			dataFilter: filter
		},
		callback: {
			beforeClick: beforeClick,
			onCheck: onCheck,
			onAsyncError : zTreeOnAsyncError,//加载失败
			onAsyncSuccess: zTreeOnAsyncSuccess//加载完成
		}
	}; 

	function getUrl(treeId, treeNode){
		var url = "<%=path %>/productPublish/getTree.do";
		return url;
	}
	
	function beforeClick(treeId, treeNode) {
		var zTree = $.fn.zTree.getZTreeObj("treeDemo");
		zTree.checkNode(treeNode, !treeNode.checked, null, true);
		return false;
	}
	
	/* 
	 * 点击事件 
	 */  
	function onCheck(e, treeId, treeNode) {  
		var areaObj = $("#productArea");
		var areaCodeObj = $("#areaCode");
	    var zTree = $.fn.zTree.getZTreeObj("treeDemo");
		var nodes = zTree.getCheckedNodes(true);
		var changeNodes = zTree.getChangeCheckedNodes();
		var v = '';
		var ids = '';
		for (var i=0, l=nodes.length; i<l; i++) {
			if(!nodes[i].isParent){
				v += nodes[i].aname + ",";
				ids += nodes[i].id + ",";
			}
		}
		if (v.length > 0 ) v = v.substring(0, v.length-1);
		if (ids.length > 0 ) ids = ids.substring(0, ids.length-1);
		areaObj.attr("value", v);
		areaCodeObj.attr("value", ids);
	}
	function _showShopArea() {
		var areaObj = $("#productArea");
		var areaOffset = $("#productArea").offset();
		
		$("#menuContent").css({left:areaOffset.left + "px", top:areaOffset.top + areaObj.outerHeight() + "px"}).slideDown("fast");
		$("body").bind("mousedown", onBodyDown);
	}

	function hideMenu() {
		$("#menuContent").fadeOut("fast");
		$("body").unbind("mousedown", onBodyDown);
	}
	
	function onBodyDown(event) {
		if (!(event.target.id == "menuBtn" || event.target.id == "menuContent" || $(event.target).parents("#menuContent").length>0)) {
			hideMenu();
		}
	}
	//过滤函数  
    function filter(treeId, parentNode, childNodes) {  
        if (!childNodes)  
            return null;  
        for ( var i = 0, l = childNodes.length; i < l; i++) {  
            //childNodes[i].name = childNodes[i].name.replace(/\.n/g, '.');  
        }  
        return childNodes;  
    }  
    //加载完成
	var firstAsyncSuccessFlag = 0;
	function zTreeOnAsyncSuccess(event, treeId, msg) {
		if (firstAsyncSuccessFlag == 0) {
        	try {
				//调用默认展开第一个结点
			//	var nodes = zTree.getNodes();
			//	zTree.expandNode(nodes[0], true);
			//	for(var i = 0; i< nodes.length; i++){
			//		zTree.expandNode(nodes[i], true);
			//	}
			//	$("#treeDemo").click();
	            
	            //异步加载完成再折叠所有子节点
	            var nodes = zTree.getNodes();
				if (nodes.length>0) {
					var index = zTree.getNodeIndex(nodes[0]);
					for(var j=0; j<nodes.length; j++){
						var rootNode = nodes[j];
						zTree.expandNode(rootNode, false, true, null, true);
					}
				}
	            
	            firstAsyncSuccessFlag = 1;
        	} catch (err) {
	              
         	}
    	}
	}
	//加载失败提示  
    function zTreeOnAsyncError(event, treeId, treeNode, XMLHttpRequest, textStatus, errorThrown) {  
        alert("加载错误：" + XMLHttpRequest);  
    }

	</script>
  </head>
  
  <body>
  	<div id="contentDiv">
  		<div style="background: #ebebeb;">
  		<input type="hidden" id="itemCode" name="itemCode" value="${itemCode }">
  		<input type="hidden" id="itemName" name="itemName" value="${itemName }">
  		<input type="hidden" id="codeName" name="codeName">
  		<input type="hidden" id="colNames" name="colNames">
  		<input type="hidden" id="paraNames" name="paraNames">
  		<input type="hidden" id="paramShows" name="paramShows">
  		<input type="hidden" id="shopId" name="shopId">
  		<input type="hidden" id="imgNum" name="imgNum" value="0">
	   	<div class="title_div">
	   		<div class="titleCss title_2"></div>
	   		<hr color="#ebebeb" height="0.1px" style="margin-top:13px;display: none;"/>
	   	</div>
	   		<div class="main_div1">
	   			<p style="float:left;white-space: nowrap;">
	   				<strong>您选择的类目：</strong>${itemName }
	   				<a style="margin-left:10px" href="#" onclick="_goBackPage()">修改</a>
	   			</p>
	   			<a href="#" class="btCss" style="display: none;">纠错/建议</a>
	   			<ul style="float:right;display: none;">
	   				<li style="width: 190px;line-height: 48px;">
	   					<a href="#" onclick="_getDraftListPage()" class="getDraftCss">查看草稿箱</a>
	   					<a class="saveDraftCss" href="#" onclick="_saveDraftInfo()">保存草稿</a>
	   				</li>
	   			</ul>
	   		</div>
	   		<div style="background:#fff;font-size: 12px;">
	   			<div class="divCss_title">商品基本信息</div>
	   			<div class="div_title_css" style="display: none;">
	   				<h4 class="tipH4">商品参数：</h4><span style="color:#999;">填错商品属性将可能导致商品下架或搜索不到，请准确填写商品属性！</span>
	   			</div>
	   			<div style="line-height:18px;">
	   				<table id="cdyPara" class="cdyParaCss" style="width: 100%;line-height: 35px;margin-top: 5px;">
	   					<tr>
	   						<td class="tdL"><h4 style="font-weight: bold;">商品参数：</h4></td>
	   						<td class="tdR">
	   						<span style="color:#999;">填错商品属性将可能导致商品下架或搜索不到，请准确填写商品属性！</span>
	   						</td>
	   					</tr>
	   					<tr>
	   						<td class="tdL">商品名称：</td>
	   						<td class="tdR">
	   							<div><input id='proName' name='proName' placeholder='请输入商品名称' value='${proName }'/></div>
	   						</td>
	   					</tr>
	   					<!-- 
	   					<tr>
	   						<td class="tdL">商品条码：</td>
	   						<td class="tdR">
	   							<div><input id='barCode' name='barCode' onblur="_clickUnit()" placeholder='请输入商品条码'/></div>
	   						</td>
	   					</tr>
	   					<tr>
	   						<td class="tdL">品牌名称：</td>
	   						<td class="tdR">
	   							<div class="brand" style="float: left;border: 1px solid #c7c7c7;height: 22px;width: 280px">
			   						<input onchange='_checkBrand(this.value)' oninput="_onchangeBrandName(this.value)"  placeholder='请输入品牌名称' onclick="_clickInput('brand')" style="height:19px;border: 0px;padding-left:5px;margin-top: -15px;" id="brand" name="brand" value=""/>
			   						<select id="selbrand" class="brand" size="2" style="overflow-y:auto;height:100px;margin: -12px 0px 0px -1px; position: absolute; width: 284px; border: 1px solid rgb(134, 180, 248);display: none;">
			   						</select>
			   						<s onclick="_clickInput('brand')" class="selectS"> </s>
			   						<br/>
		   						</div>
		   						<div id="brandTip" style="color: red;float: left;border: 0px;line-height: 20px;white-space: nowrap;display: none;">&nbsp;品牌不存在，请输入正确的品牌名称</div>
	   						</td>
	   					</tr> -->
	   					<tr>
	   						<td class="tdL">计量单位：</td>
	   						<td class="tdR">
	   							<div class="measuring" style="float: left;border: 1px solid #c7c7c7;height: 22px;">
			   						<input onclick="_clickInput('measuring')" style="height:19px;border: 0px;padding-left:3px;margin-top: -15px;" value="${pro.proUnitName }" id="measuring" name="measuring" placeholder="请选择计量单位"/>
			   						<input type='hidden' value="${pro.proUnitCode }#@${pro.proUnitName }" id="measuringNew" name="measuringNew" placeholder="请选择计量单位"/>
			   						<s onclick="_clickInput('measuring')" class="selectS"> </s>
		   						</div>
		   						<div>
		   						<input id='unitCode' name='unitCode' type="hidden" value="${pro.proUnitCode }"/>
		   						<input id='unitName' name='unitName' type="hidden" onclick="_clickUnit()" placeholder='请输入计价单位' value="${pro.proUnitName }"/>
		   						</div>
	   						</td>
	   					</tr>
	   				</table>
	   				<table class="cdyParaCss" style="width: 100%;line-height: 35px;margin-top: 5px;">
	   					<tr>
		   					<td style="">
		   						<s onclick="_addPara()" class="addPrice_css" style="margin-top: -1px;margin-right: -5px;float: right;"> </s>
	   						</td>
							<td onclick="_addPara()" style="width: 5%">
	   							<span style="color: #039;white-space: nowrap;">添加自定义参数</span>
							</td>
							<td style="color: #999;width:75%">(如不能满足您的需求，可添加自定义参数)</td>
	   					</tr>
   					</table>
   					<!-- 
   					<table id="cdyArea" class="cdyAreaCss" style="width: 100%;line-height: 35px;margin-top: 5px;">
	   					<tr style="">
	   						<td class="tdL" style="vertical-align: top;text-align: right;width: 152px;">买家范围：</td>
	   						<td class="tdR" style="width: 295px;text-align: left;padding-left: 10px;vertical-align: middle;" colspan="2">
	   							<div class="buyerRange" style="float: left;border: 1px solid #c7c7c7;height: 22px;width: 282px">
			   						<input onclick="_clickInput('buyerRange')" style="height:19px;border: 0px;padding-left:5px;margin-top: -15px;width: 90%" id="buyerRange" name="buyerRange" value="全部"/>
			   						<s onclick="_clickInput('buyerRange')" class="selectS"> </s>
			   						<br/>
			   						<select id="selbuyerRange" class="buyerRange" size="2" style="overflow-y:auto;height:40px;margin: -12px 0 0 -1px; position: absolute; width: 284px; border: 1px solid rgb(134, 180, 248);display: none;">
			   							<option value="1" class='selectO' onclick="_clickOption('buyerRange','全部')">&nbsp;全部</option>
			   							<option value="2" class='selectO' onclick="_clickOption('buyerRange','自定义')">&nbsp;自定义</option>
			   						</select>
		   						</div>
	   						</td>
	   					</tr>
	   					<tr style="height: 100px">
	   						<td class="tdL" style="vertical-align: top;text-align: right;width: 152px;">商品销售区域：</td>
	   						<td class="tdR" style="width: 295px;text-align: left;padding-left: 10px;vertical-align: middle;">
	   							<input type="hidden" id="areaCode" name="areaCode" value="${areaCode }"/>
   								<textarea id="productArea" name="productArea" style="width: 400px; height: 100px; resize: none;" 
   									readonly="readonly" onclick="_showShopArea();">${areaName}</textarea>
   								<div id="menuContent" class="menuContent" style="display:none; position: absolute;border: 0px;">
									<ul id="treeDemo" class="ztree" style="margin-top:0; width:396px;height:230px;display: ">
									</ul>
								</div>
	   						</td>
	   						<td style="">
	   							<button style="margin-left: 10px;height: 30px;width: 70px;background: #f3ed07;border-radius:5px;margin-top: 65px;"
	   							onclick="_showShopArea();return false;">区域选择</button>
	   						</td>
	   					</tr>
	   				</table>
	   				 -->
	   			</div>
	   			<div class="borderCss"></div>
	   			<div  class="div_title_css">
	   				<h4 class="tipH4" style="padding-top: 4px;"><span style="color: #f00;">*</span>商品关键词：</h4>
	   				<table style="text-align: center;width: 80%">
	   					<tr>
	   						<td><input id="keyWord1" name="keyWord1" onkeyup="_keyWordLength()"/></td>
	   						<td><input id="keyWord2" name="keyWord2" onkeyup="_keyWordLength()"/></td>
	   						<td><input id="keyWord3" name="keyWord3" onkeyup="_keyWordLength()"/></td>
	   						<td><input id="keyWord4" name="keyWord4" onkeyup="_keyWordLength()"/></td>
	   						<td><input id="keyWord5" name="keyWord5" onkeyup="_keyWordLength()"/></td>
	   						<td>
		   						<span id="keyWordSpan" style="color: #f00;display:none">请输入商品关键词</span>
	   						</td>
	   					</tr>
	   				</table>
	   				<p>商品关键词用于商品匹配，并影响到搜索排名。关键词建议填写商品专业名称、别称、习惯叫法等，切勿填写与商品无关的词汇。
						<br>最多可填写5个关键词，每个文本框一个关键词，每个关键词不可超过20个字符，无需添加标点符号。</p>
	   			</div>
	   			<div class="borderCss" style="display: none;"></div>
	   			<div  class="div_title_css" style="display: none;">
	   				<h4 class="tipH4" style="padding-top:4px;"><span style="color: #f00;">*</span>信息标题：</h4>
	   				<input style="width:400px;height:22px;padding-left:3px;" onkeyup="_change(this.value)"/><span id="pId" style="color:#999;padding-left: 10px;">0/60字</span>
	   				<p style="padding-left:80px;">勿使用联系人、联系方式、疑问词句，特殊字符及堆砌关键词。建议包含：品牌+型号+商品关键词</p>
	   			</div>
	   		</div>
		   	<div class="mainDiv">
				<div class="subDiv">
					<div class="nextDiv">
						<button onclick="_save()">下一步,图文信息</button>
					</div>
				</div>
		   	</div>
		 </div>
  	</div>
  </body>
  	<script type="text/javascript">
  		function _keyWordLength(){//是否填写关键字验证
  	  		var len = 0;
  	  		for(var i=1;i<=5;i++){
  	  	  		len += $("#keyWord"+i).val().length;
  	  		}
  	  		if(len<=0) $("#keyWordSpan").css("display","");
  	  		else $("#keyWordSpan").css("display","none");
  		}
		function _change(value){//信息标题长度
			_keyWordLength();
			$("#pId").empty();
			$("#pId").html(value.length+"/60字");
		}

    	function _checkKeyWord(){
    		var keyWord1 = $("#keyWord1").val();
    		var keyWord2 = $("#keyWord2").val();
    		var keyWord3 = $("#keyWord3").val();
    		var keyWord4 = $("#keyWord4").val();
    		var keyWord5 = $("#keyWord5").val();
    		if(keyWord1=="" && keyWord2=="" && keyWord3=="" && keyWord4 =="" && keyWord5==""){
    		  return true;
    		} else {
    		  return false;
    		}
    	}
    	$(function(){
			_reHeight("rightFrame","contentDiv");
			_baseParam("${itemCode}");
			_onchangeBrandName("");
		});
	</script>
	
</html>
